package com.example.mcdonaldapplication.activity

import android.app.Activity
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Handler
import com.example.mcdonaldapplication.R

class StartActivity : Activity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_start)
        Handler { //实现页面跳转
            startActivity(Intent(applicationContext, MainActivity::class.java))
            finish()
            false
        }.sendEmptyMessageDelayed(0, 2000) //表示延时三秒进行任务的执行
    }
}